//
//  GoodsCell.m
//  Leisure
//
//  Created by xalo on 16/6/30.
//  Copyright © 2016年 朱旭东. All rights reserved.
//

#import "GoodsCell.h"
@interface GoodsCell()

@property (weak, nonatomic) IBOutlet UIImageView *coverimg;//背景图
@property (weak, nonatomic) IBOutlet UILabel *info;//购物信息
@property(nonatomic,strong)NSString *string;
@end

@implementation GoodsCell



- (void)awakeFromNib {
    
}

//根据modellai设置cell的显示
- (void)setCellWIthModel:(GoodsModel *)mode{

    self.info.text = mode.title;
    [self.coverimg sd_setImageWithURL:[NSURL URLWithString:mode.coverimg]];
    self.string = mode.buyurl;
}

- (IBAction)btnAction:(id)sender {
    
    if (self.btnBlock) {
        self.btnBlock();
}
    
//    [[UIApplication sharedApplication]openURL:[NSURL URLWithString:self.string]];
}





@end
